<template>
  <div>
    <a-form :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }">
      <a-form-item label="退回类型" required>
        <ZgSwitch :width="100" v-model="isSelf" :text="['本流程','前置流程']"></ZgSwitch>
      </a-form-item>
      <a-form-item v-if="isSelf" label="选择环节" required>
        <a-table
          :data-source="list"
          :pagination="false"
          :row-selection="{selectedRowKeys:ids,onChange:selectedRowKeys=>ids=selectedRowKeys,columnWidth:45 }">
          <a-table-column title="环节名称" dataIndex="stepName"></a-table-column>
          <a-table-column title="环节编号" dataIndex="stepNo"></a-table-column>
          <a-table-column title="处理人" dataIndex="userName"></a-table-column>
          <a-table-column title="生成时间" dataIndex="createTime"></a-table-column>
          <a-table-column title="处理时间" dataIndex="handleTime"></a-table-column>
          <a-table-column title="是否推送共享" dataIndex="hasPush"></a-table-column>
        </a-table>
      </a-form-item>
      <a-form-item v-if="!isSelf" label="选择环节" required>
        <a-tabs v-model="tab">
          <a-tab-pane key="1" tab="XX流程"></a-tab-pane>
          <a-tab-pane key="2" tab="XX流程"></a-tab-pane>
        </a-tabs>
        <a-table
          :data-source="list"
          :pagination="false"
          :row-selection="{selectedRowKeys:ids,onChange:selectedRowKeys=>ids=selectedRowKeys,columnWidth:45 }">>
          <a-table-column title="环节名称" dataIndex="stepName"></a-table-column>
          <a-table-column title="环节编号" dataIndex="stepNo"></a-table-column>
          <a-table-column title="处理人" dataIndex="userName"></a-table-column>
          <a-table-column title="生成时间" dataIndex="createTime"></a-table-column>
          <a-table-column title="处理时间" dataIndex="handleTime"></a-table-column>
          <a-table-column title="是否推送共享" dataIndex="hasPush"></a-table-column>
        </a-table>
      </a-form-item>
      <a-form-item label="退回理由" required>
        <ZgTextarea></ZgTextarea>
      </a-form-item>
    </a-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      isSelf: true,
      tab: '1',
      ids: [],
      list: [
        { key: '1', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true },
        { key: '2', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true },
        { key: '3', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true },
        { key: '4', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true },
        { key: '5', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true },
        { key: '6', stepName: '数量单制单', stepNo: '01', createTime: '2025/05/27 12:30:30', handleTime: '2025/05/27 14:40:57', userName: '任那', isPush: true }
      ]
    }
  }
}
</script>

<style scoped>

</style>
